package com.ysd.lis.controller.sys;


import com.ysd.common.Result;
import com.ysd.lis.controller.pub.BaseController;
import com.ysd.lis.entity.SysFlowNodeEvent;
import com.ysd.lis.request.SysFlowParam;
import com.ysd.lis.service.SysFlowNodeEventService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 员工表
 * 前端控制器
 * </p>
 *
 * @author prs
 * @since 2024-04-01
 */
@Api(tags = "流程节点事件")
@RestController
@RequestMapping("/api/sys/flowNodeEvent")
public class SysFlowNodeEventController extends BaseController {

    @Autowired
    SysFlowNodeEventService sysFlowNodeEventService;

    @ApiOperation("查询")
    @GetMapping("/findEventList")
    public Result findEventList(SysFlowParam param){
        return sysFlowNodeEventService.findEventList(param);
    }

    @ApiOperation("新增")
    @PostMapping("/addEvent")
    public Result addEvent(@RequestBody SysFlowNodeEvent event){
        return  sysFlowNodeEventService.addEvent(event);
    }

    @ApiOperation("修改")
    @PostMapping("/editEvent")
    public Result editEvent(@RequestBody SysFlowNodeEvent event) {
        return sysFlowNodeEventService.editEvent(event);
    }

    @ApiOperation("根据详情id删除详情数据")
    @PostMapping("/deleteEvent")
    public Result deleteEvent(@RequestBody SysFlowNodeEvent event) {
        return sysFlowNodeEventService.deleteEvent(event);
    }
}
